/*
 * RendreVehicule.cpp
 *
 *  Created on: 23 mars 2012
 *      Author: root
 */

#include "RendreVehicule.h"
#include <fstream>


RendreVehicule::RendreVehicule() {}

RendreVehicule::RendreVehicule(string NumMatricule, string NomAgent ,string EtatVehicule,string DateRendu,long NumParking,long NumAgence)
{
	this-> NomAgent=NomAgent;
	this-> NumMatricule=NumMatricule;
	this-> NumParking=NumParking;
	this-> EtatVehicule=EtatVehicule;
	this-> DateRendu=DateRendu;
	this->NumAgence=NumAgence;

}


RendreVehicule::RendreVehicule(const RendreVehicule& V)
{
		NomAgent=V.NomAgent;
		NumMatricule=V.NumMatricule;
		NumParking=V.NumParking;
		EtatVehicule=V.EtatVehicule;
		DateRendu=V.DateRendu;
		NumAgence=V.NumAgence;
}


RendreVehicule::~RendreVehicule() {}

string RendreVehicule::getNomAgent() const
{
	return NomAgent;
}

void RendreVehicule::setNomAgent(string NomAgent)
{
	this->NomAgent=NomAgent;
}



string RendreVehicule::getNumMatricule() const
{
	return NumMatricule;
}

void RendreVehicule::setNumMatricule(string NumMatricule)
{
	this->NumMatricule=NumMatricule;
}

string RendreVehicule::getEtatVehicule() const
{
    return EtatVehicule;
}

void  RendreVehicule::setEtatVehicule(string EtatVehicule)
{
	this ->EtatVehicule = EtatVehicule;
}

string RendreVehicule::getDateRendu() const
{
    return DateRendu;
}
void  RendreVehicule::setDateRendu(string DateRendu)
{
	this ->DateRendu = DateRendu;
}

long RendreVehicule::getNumParking() const
{
    return NumParking;
}
void  RendreVehicule::setNumParking(long NumParking)
{
	this ->NumParking = NumParking;
}

long RendreVehicule::getNumAgence() const
{
    return NumAgence;
}
void  RendreVehicule::setNumAgence(long NumAgence)
{
	this ->NumAgence = NumAgence;
}

ifstream& operator>>(ifstream& in,RendreVehicule& RV)
{
in>>RV.NumParking;
in>>RV.EtatVehicule;
in>>RV.DateRendu;
in>>RV.NumAgence;
in>>RV.NomAgent;
in>>RV.NumMatricule;
return in;
}

ofstream& operator<<(ofstream& out,const RendreVehicule& RV)
{
out<<RV.getNumMatricule()<<" "<<RV.getNomAgent()<<" "<<RV.getEtatVehicule()<<" "<<RV.getDateRendu()<<" "<<RV.getNumParking()<<" "<<RV.getNumAgence();
return out;
}

ostream& operator<<(ostream& out , const RendreVehicule& RV)
{
out<<"Nom Agent : "<<RV.getNomAgent()<<"\t"<<"Num Agent: "<<RV.getNumAgence()<<"\t"
<<"Num Matricule : "<<RV.getNumMatricule()<<"Num Parking : "<<RV.getNumParking()<<"\t"
<<"Etat Vehicule : "<<RV.getEtatVehicule()<<"\t"
<<"Date Rendu : "<<RV.getDateRendu()<<"\t"<<endl;
return out ;
}
